<?php
/**
 * Created PhpStorm.
 * User: 1971229701@qq.com
 * Date: 2020/6/19
 * Time: 14:35
 */

namespace app\index\controller;


use app\BaseController;
use app\model\Log;
use think\facade\Db;
use think\facade\Env;

class Index extends BaseController
{
    public function  index()
    {

        $fileName=app()->getRootPath().'public/static/img/1.jpg1';
        halt(filesize($fileName));
        header( "Content-Disposition:  attachment;  filename=".$fileName); //告诉浏览器通过附件形式来处理文件
        header('Content-Length: ' . filesize($fileName)); //下载文件大小
        readfile($fileName);  //读取文件内容
        return ;
        $data = ['name'=>'lixuefeng','sex'=>'男','age'=>24];
        $res = (new Log())->json($data)->insert();

        return $res;
        $uid = input('to_uid',0);
        $client_id = input('client_id',0);
        $say = input('say','');

        return view('',['huida'=>$say,'uid'=>$uid,'client_id'=>$client_id]);
    }


    public function test()
    {
        return view();
    }

}
